package com.example.demo.dao;

import com.example.demo.pojo.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface MemberDao {
    int deleteByPrimaryKey(Integer memberid);
    //新增会员
    int insert(Member record);

    int insertSelective(Member record);

    Member selectByPrimaryKey(Integer memberid);
    //根据用户查看会员信息
    @Select("select * from member where userId=#{Uid}")
    Member selectByUid(Integer Uid);
    //查看所有会员
    @Select("select * from member")
    List<Member> selectAll();

    int updateByPrimaryKeySelective(Member record);

    int updateByPrimaryKey(Member record);
}